/* var emp={
	eid:1,
	ename:'涛',
	sex:'男',
	salary:50000
}
//遍历属性
for (var k in emp){
	//
	console.log(k,emp[k])
} */

var chengji={
	s1:80,
	s2:79,
	s3:90,
	s4:84,
}
//遍历属性得到每一个成绩
var sum=0,count=0;
for(var k in chengji){
	//console.log(k,score[k]);
	//把每个成绩加到sum
	sum+=chengji[k];
	//遍历一个成绩，数量加1
	count++
}
console.log(sum,count,sum/count)